<?php

namespace App\Transformers;

use App\Models\Payment;

class PaymentTransformer extends BaseTransformer
{
    public function transform(Payment $model)
    {
        $data = [
            'id' => $model->id,
            'account' => $model->account,
            'payment_method' => $model->payment_method,
            'amount' => $model->amount,
            'action' => $model->action,
            'status' => $model->status,
            'created_at' => $model->created_at->toDateTimeString(),
        ];

        return $this->_select($data);
    }
}
